<style>
	.blog{max-width:1200px;padding:30px 15px;margin:auto;text-align:center;}
	
</style>
<template>
	<div class="blog">
		<app-phrase :title="title" />
	</div>
</template>

<script>
	import Phrase from '../components/phrase.vue'
	import { ref,onMounted } from 'vue'
	export default{
		name:'Bolg',
		components: {
			'app-phrase': Phrase,
		},
		setup() {
			onMounted(()=>{
				var scroll = document.getElementById("scroll");
				var content = document.getElementById("content");
				var copyContent = document.getElementById("copyContent");
				copyContent.innerHTML = content.innerHTML;
				setInterval(function () {
					//scrollTop 滚动的距离  offsetTop当前元素离顶部的距离
					if (scroll.scrollTop >= copyContent.offsetTop - content.offsetTop) {
						scroll.scrollTop = 0;
					}
					scroll.scrollTop++;
				}, 60);
			});
			const title = ref('本想作为一条咸鱼，奈何咸过了头，变成了苦，无奈只能苦中作乐');
			return { title }
		},
	}
</script>


